package com.matricula.model;
// Generated 9/12/2013 01:55:35 AM by Hibernate Tools 3.2.1.GA


import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Matricula generated by hbm2java
 */
@Entity
@Table(name="MATRICULA"
    ,catalog="matriculacetpro"
)
public class Matricula  implements java.io.Serializable {


     private MatriculaId id;
     private Grupo grupo;
     private Alumno alumno;
     private Date fecMatricula;
     private String observacion;

    public Matricula() {
    }

	
    public Matricula(MatriculaId id, Grupo grupo, Alumno alumno) {
        this.id = id;
        this.grupo = grupo;
        this.alumno = alumno;
    }
    public Matricula(MatriculaId id, Grupo grupo, Alumno alumno, Date fecMatricula, String observacion) {
       this.id = id;
       this.grupo = grupo;
       this.alumno = alumno;
       this.fecMatricula = fecMatricula;
       this.observacion = observacion;
    }
   
     @EmbeddedId
    
    @AttributeOverrides( {
        @AttributeOverride(name="alumnoIdAlumno", column=@Column(name="ALUMNO_idAlumno", nullable=false, length=15) ), 
        @AttributeOverride(name="grupoIdGrupo", column=@Column(name="GRUPO_idGrupo", nullable=false) ) } )
    public MatriculaId getId() {
        return this.id;
    }
    
    public void setId(MatriculaId id) {
        this.id = id;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="GRUPO_idGrupo", nullable=false, insertable=false, updatable=false)
    public Grupo getGrupo() {
        return this.grupo;
    }
    
    public void setGrupo(Grupo grupo) {
        this.grupo = grupo;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ALUMNO_idAlumno", nullable=false, insertable=false, updatable=false)
    public Alumno getAlumno() {
        return this.alumno;
    }
    
    public void setAlumno(Alumno alumno) {
        this.alumno = alumno;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="fecMatricula", length=10)
    public Date getFecMatricula() {
        return this.fecMatricula;
    }
    
    public void setFecMatricula(Date fecMatricula) {
        this.fecMatricula = fecMatricula;
    }
    
    @Column(name="observacion", length=45)
    public String getObservacion() {
        return this.observacion;
    }
    
    public void setObservacion(String observacion) {
        this.observacion = observacion;
    }




}


